﻿<UserControl x:Class="BYS.XiAnComDept.App.Pages.FundQuery"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="800">
    <Grid Style="{StaticResource ContentRoot}">
        <ScrollViewer>
            <StackPanel MinWidth="200" Orientation="Vertical">
                <StackPanel Orientation="Horizontal" Name="PanelProjectTypes" VerticalAlignment="Center" Margin="0,0,0,10">
                    <TextBlock VerticalAlignment="Center" Margin="0,0,10,0" Height="26">项目类别：</TextBlock>
                    <WrapPanel Name="FundTypePanel" Orientation="Horizontal" MaxWidth="800" ItemWidth="200"></WrapPanel>
                    <Button Name="ButtonRefreshFundTypes" Click="ButtonRefreshFundTypes_Click" Margin="50,0,0,0" Height="26">刷新类别</Button>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock VerticalAlignment="Center" Margin="0,0,10,0">年　　度：</TextBlock>
                    <ComboBox Name="ComboBoxYear" Width="100"></ComboBox>
                    <TextBlock VerticalAlignment="Center" Margin="50,0,10,0">单位名称：</TextBlock>
                    <TextBox Name="TextBoxComName" Width="200"></TextBox>
                    <Button Name="ButtonSearch" Click="ButtonSearch_Click" Margin="50,0,0,0">查询</Button>
                    <Button Name="ButtonExport" Margin="50,0,0,0" Width="180" Click="ButtonExport_Click">导出到Excel</Button>
                </StackPanel>
                <DataGrid Name="DataGridFundData" AutoGenerateColumns="False" IsReadOnly="True">
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=Year.Year}" Header="年度"/>
                        <DataGridTextColumn Binding="{Binding Path=Company.CompanyName}" Header="单位名称"/>
                        <DataGridTextColumn x:Name="colProjectType" Binding="{Binding Path=FundType.FundTypeName}" Header="项目类别"/>
                        <DataGridTextColumn Binding="{Binding Path=Amount}" Header="申报金额"/>
                        <DataGridTextColumn Binding="{Binding Path=ApprovedAmount}" Header="审核金额"/>
                        <DataGridTextColumn Binding="{Binding Path=FundStatus}" Header="申请状态"/>
                        <DataGridTextColumn Binding="{Binding Path=DueAmount}" Header="尾款"/>
                        <DataGridTextColumn Binding="{Binding Path=Comment}" Header="备注"/>
                    </DataGrid.Columns>
                    <DataGrid.Resources>
                        <Style TargetType="DataGridRow">
                            <EventSetter Event="MouseDoubleClick" Handler="DataRow_DoubleClick"/>
                        </Style>
                    </DataGrid.Resources>
                </DataGrid>
            </StackPanel>
        </ScrollViewer>
    </Grid>
</UserControl>
